package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.BasisBatteryEnvironmentMapper;
import com.ruoyi.domain.BasisBatteryEnvironment;
import com.ruoyi.service.IBasisBatteryEnvironmentService;

/**
 * 电池环境数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-02
 */
@Service
public class BasisBatteryEnvironmentServiceImpl implements IBasisBatteryEnvironmentService 
{
    @Autowired
    private BasisBatteryEnvironmentMapper basisBatteryEnvironmentMapper;

    /**
     * 查询电池环境数据
     * 
     * @param id 电池环境数据主键
     * @return 电池环境数据
     */
    @Override
    public BasisBatteryEnvironment selectBasisBatteryEnvironmentById(Long id)
    {
        return basisBatteryEnvironmentMapper.selectBasisBatteryEnvironmentById(id);
    }

    /**
     * 查询电池环境数据列表
     * 
     * @param basisBatteryEnvironment 电池环境数据
     * @return 电池环境数据
     */
    @Override
    public List<BasisBatteryEnvironment> selectBasisBatteryEnvironmentList(BasisBatteryEnvironment basisBatteryEnvironment)
    {
        return basisBatteryEnvironmentMapper.selectBasisBatteryEnvironmentList(basisBatteryEnvironment);
    }

    /**
     * 新增电池环境数据
     * 
     * @param basisBatteryEnvironment 电池环境数据
     * @return 结果
     */
    @Override
    public int insertBasisBatteryEnvironment(BasisBatteryEnvironment basisBatteryEnvironment)
    {
        basisBatteryEnvironment.setCreateTime(DateUtils.getNowDate());
        return basisBatteryEnvironmentMapper.insertBasisBatteryEnvironment(basisBatteryEnvironment);
    }

    /**
     * 修改电池环境数据
     * 
     * @param basisBatteryEnvironment 电池环境数据
     * @return 结果
     */
    @Override
    public int updateBasisBatteryEnvironment(BasisBatteryEnvironment basisBatteryEnvironment)
    {
        return basisBatteryEnvironmentMapper.updateBasisBatteryEnvironment(basisBatteryEnvironment);
    }

    /**
     * 批量删除电池环境数据
     * 
     * @param ids 需要删除的电池环境数据主键
     * @return 结果
     */
    @Override
    public int deleteBasisBatteryEnvironmentByIds(Long[] ids)
    {
        return basisBatteryEnvironmentMapper.deleteBasisBatteryEnvironmentByIds(ids);
    }

    /**
     * 删除电池环境数据信息
     * 
     * @param id 电池环境数据主键
     * @return 结果
     */
    @Override
    public int deleteBasisBatteryEnvironmentById(Long id)
    {
        return basisBatteryEnvironmentMapper.deleteBasisBatteryEnvironmentById(id);
    }
}
